Interface StorageInterface

Summary

Fully Qualified Name: Laminas\Cache\Storage\StorageInterface

Description

Methods

Name Description Defined By
addItem() Add an item. StorageInterface
addItems() Add multiple items. StorageInterface
checkAndSetItem() Set an item only if token matches StorageInterface
decrementItem() Decrement an item. StorageInterface
decrementItems() Decrement multiple items. StorageInterface
getCapabilities() Capabilities of this storage StorageInterface
getItem() Get an item. StorageInterface
getItems() Get multiple items. StorageInterface
getMetadata() Get metadata of an item. StorageInterface
getMetadatas() Get multiple metadata StorageInterface
getOptions() Get options StorageInterface
hasItem() Test if an item exists. StorageInterface
hasItems() Test multiple items. StorageInterface
incrementItem() Increment an item. StorageInterface
incrementItems() Increment multiple items. StorageInterface
removeItem() Remove an item. StorageInterface
removeItems() Remove multiple items. StorageInterface
replaceItem() Replace an existing item. StorageInterface
replaceItems() Replace multiple existing items. StorageInterface
setItem() Store an item. StorageInterface
setItems() Store multiple items. StorageInterface
setOptions() Set options. StorageInterface
touchItem() Reset lifetime of an item StorageInterface
touchItems() Reset lifetime of multiple items. StorageInterface

Method Details

addItem()

Add an item.

Parameter Name Type Description
$key string
$value mixed

Returns: bool

addItems()

Add multiple items.

Parameter Name Type Description
$keyValuePairs array

Returns: array Array of not stored keys

checkAndSetItem()

Set an item only if token matches

It uses the token received from getItem() to check if the item has changed before overwriting it.

Parameter Name Type Description
$token mixed
$key string
$value mixed

Returns: bool

decrementItem()

Decrement an item.

Parameter Name Type Description
$key string
$value int

Returns: int|bool The new value on success, false on failure

decrementItems()

Decrement multiple items.

Parameter Name Type Description
$keyValuePairs array

Returns: array Associative array of keys and new values

getCapabilities()

Capabilities of this storage

Returns: \Capabilities

getItem()

Get an item.

Parameter Name Type Description
$key string
$success bool
$casToken mixed

Returns: mixed Data on success, null on failure

getItems()

Get multiple items.

Parameter Name Type Description
$keys array

Returns: array Associative array of keys and values

getMetadata()

Get metadata of an item.

Parameter Name Type Description
$key string

Returns: array|bool Metadata on success, false on failure

getMetadatas()

Get multiple metadata

Parameter Name Type Description
$keys array

Returns: array Associative array of keys and metadata

getOptions()

Get options

Returns: \Adapter\AdapterOptions

hasItem()

Test if an item exists.

Parameter Name Type Description
$key string

Returns: bool

hasItems()

Test multiple items.

Parameter Name Type Description
$keys array

Returns: array Array of found keys

incrementItem()

Increment an item.

Parameter Name Type Description
$key string
$value int

Returns: int|bool The new value on success, false on failure

incrementItems()

Increment multiple items.

Parameter Name Type Description
$keyValuePairs array

Returns: array Associative array of keys and new values

removeItem()

Remove an item.

Parameter Name Type Description
$key string

Returns: bool

removeItems()

Remove multiple items.

Parameter Name Type Description
$keys array

Returns: array Array of not removed keys

replaceItem()

Replace an existing item.

Parameter Name Type Description
$key string
$value mixed

Returns: bool

replaceItems()

Replace multiple existing items.

Parameter Name Type Description
$keyValuePairs array

Returns: array Array of not stored keys

setItem()

Store an item.

Parameter Name Type Description
$key string
$value mixed

Returns: bool

setItems()

Store multiple items.

Parameter Name Type Description
$keyValuePairs array

Returns: array Array of not stored keys

setOptions()

Set options.

Parameter Name Type Description
$options array|\Traversable|\Adapter\AdapterOptions

Returns: \StorageInterface Fluent interface

touchItem()

Reset lifetime of an item

Parameter Name Type Description
$key string

Returns: bool

touchItems()

Reset lifetime of multiple items.

Parameter Name Type Description
$keys array

Returns: array Array of not updated keys

Top